Ear level device for synthesizing music

ABSTRACT

The present invention relates to an ear level electronic device comprising a housing that is adapted to be worn behind the ear, in the ear, or in the ear canal, and to enclose a music synthesizer for generation of an electrical signal representing music and an output transducer for conversion of the electrical signal into sound. In the device, sound generators are controlled by pseudo-random number generators generating sequences of self-similar numbers whereby music is synthesized that is surprisingly relaxing and comfortable to listen to. Further, a music sequence generated by such a number generator is extremely long so that a person listening to the music does not have a perception of being listening to repeated music sequences.

FIELD OF THE INVENTION

[0001] The present invention relates to an ear level electronic devicecomprising a housing that is adapted to be worn behind the ear, in theear, or in the ear canal, and to enclose a music synthesizer forgeneration of an electrical signal representing music and an outputtransducer for conversion of the electrical signal into sound.

BACKGROUND OF THE INVENTION

[0002] Music is a sequence of sounds, such as tones, chords, etc,preferably generated in pleasant patterns. In the present context, theterm music denotes a sequence of sounds that has a duration allowing alistener to listen comfortably to the music for extended periods oftime. Preferably, music is a sequence of sounds with a duration that islonger than 5 seconds, preferably longer than 10 seconds, more preferredlonger than 20 seconds, even more preferred longer than 30 seconds,still more preferred longer than one minute, and most preferredsubstantially longer than one minute.

[0003] The electronic device may relieve living beings of stress andanxiety, and in particular living beings may be relieved of stress,anxiety and upsets caused by tinnitus when listening to musicsynthesized by the device.

[0004] Tinnitus occurs in a subjective and an objective form. A personthat has a sensation of head noises, such as buzzing, ringing,whistling, hissing, etc, is said to suffer from tinnitus. When theperson has the sensation without an external cause, the tinnitus issubjective. When the head noises can be heard or measured by anexaminer, the tinnitus is objective. The head noises may be heardintermittently or the noises may vary over time in another way.

[0005] It is well-known that a person suffering from tinnitus mayperceive a relief from tinnitus by listening to an externally generatedsound.

[0006] An externally generated sound may mask tinnitus. In general, theterm masking refers to the influence on tinnitus during presence ofanother sound. However, the influence may continue after termination ofthe masking sound. The masking may be complete meaning that tinnitus isnot heard during presence of the masking sound or, the masking may bepartial meaning that tinnitus is heard with reduced loudness duringpresence of the masking sound. Masking devices generating sounds basedon electronic noise signals are well-known in the art. Noise generators,e.g. pseudo-random noise generators, are employed providing stationarynoise with a certain bandwidth. However, typically, random noise is notcomfortable to listen to, and a positive masking effect requires thatthe noise is more pleasant to listen to than the tinnitus itself.

[0007] It is also known that externally generated sounds may inhibittinnitus so that the tinnitus is not heard (complete inhibition) or isheard with reduced loudness (partial inhibition) after termination ofthe inhibiting sound. Typically, the tinnitus is heard again seconds orminutes after termination of the inhibiting sound but sometimes thetinnitus is inhibited for hours or days. Pure tones or noise with anarrow bandwidth have been shown to inhibit tinnitus. E.g. in U.S. Pat.No. 5,325,872, a device is disclosed for inhibiting tinnitus with puretones by repetitively sweeping the tone across a narrow frequencyinterval around the frequency of the tinnitus. The repetition period maybe selected between 0.1 and 1000 s.

[0008] Through habituation, a person's perception of tinnitus may bechanged by exposure of the person to sound during a longer period oftime. Typically, other therapeutic methods are also included in thetreatment of the person. By habituation, the tinnitus perception ischanged so that nuisance caused by tinnitus is eliminated or reduced.Typically, noise signals are used for habituation. The loudness of thenoise signals is adjusted so that the tinnitus is still heard. This isimportant for habituation to be obtained. Thus, a complete masking isnot allowed.

[0009] However, it is a disadvantage of utilization of noise signals,such as white or pink noise signals, that the corresponding soundstypically cause some nuisance to the listener and may mask signals ofinterest to the listener.

[0010] Finally, it is known that listening to sounds in general mayrelieve nuisance caused by tinnitus. Listening to music may for examplehave a positive effect on a person's perception of tinnitus. Further,music may also affect emotions caused by tinnitus, such as stress, byhaving a general relaxing effect whereby the positive effect oflistening is increased. This treatment is known as desensibilisation.DE-A1-44 27 216 discloses a device generating music of a specificcategory selected by the tinnitus patient, e.g. classic, pop ormeditation music. The music sequence may be stored magnetically on atape or be stored in digitized form in a semiconductor memory. It issuggested that the music signals may be transmitted to a hearing aid bywireless transmission means.

[0011] Tinnitus may occur together with another hearing impairment. InWO-A-94/09606, a tinnitus masking device is disclosed for maskingtinnitus where the frequency of the tinnitus occurs in a narrowfrequency band in which the hearing is impaired. Thus, this device alsostimulates the sensory nerves in a narrow frequency band around thefrequency of the tinnitus.

SUMMARY OF THE INVENTION

[0012] It is an object of the present invention to provide an apparatusfor generation of a signal representing sound that is emotionallyneutral and non-distracting so that a person suffering from tinnitus maylisten comfortably to sounds based on this signal for extended periodsof time with a sensation of relief and thus without getting distractedwith the synthesized sounds.

[0013] It is a further object of the invention to provide the apparatusin a hearing aid type of apparatus, i.e. an apparatus that is wornbehind the ear, or in the ear, or in the ear canal as is well-known inthe art of hearing aids.

[0014] Preferably, the apparatus is used for desensibilisation or forhabituation.

[0015] The device may incorporate means for turning the musicsynthesizer off manually or automatically. The device may furthercomprise means for detecting a desired signal, such as speech, music,etc, and for turning the music synthesizer off automatically upondetection of the desired signal.

[0016] Further, the synthesized sounds should not mask any signals ofinterest, e.g. communication signals and other signals that the personneeds or desires to hear.

[0017] According to a first aspect of the present invention an ear levelelectronic device is provided, comprising a housing that is adapted tobe worn behind the ear, in the ear, or in the ear canal, and to enclosea music synthesizer for generation of a first electrical signalrepresenting music and an output transducer for conversion of the firstelectrical signal into sound.

[0018] An ear level electronic device is a device that is worn like ahearing aid, i.e. behind the ear, in the ear, or in the ear canal, andwherein the output of the output transducer is led to the eardrum in away that is well-known in the art of hearing aids.

[0019] The device may be incorporated into a hearing aid, such as adigital hearing aid that comprises an input transducer, the outputtransducer, a digital signal processing means, and the music synthesizerfor generating the electronic signal representing music to be reproducedby the output transducer. Preferably, the music synthesizer isincorporated in the digital signal processing means, i.e. the digitalsignal processing means is adapted to perform the functions of the musicsynthesizer.

[0020] The music synthesizer may be adapted to generate the synthesizedmusic at the output transducer with a loudness or amplitude level thatdoes not mask the tinnitus completely, i.e. the user may still perceiveto hear the tinnitus sound at a reduced level.

[0021] The music synthesizer may comprise a sound generator andpreferably, the synthesizer comprises a set of sound generators. Thesound generators may be controlled digitally.

[0022] Each sound generator may be adapted to generate an electronicsignal representing a tone of a specific loudness and frequency and witha specific spectral content, thus, representing a tone with a specificsonorous figure. Further, fade-in and fade-out time constants of agenerated tone may be controlled. The adjustable parameters, such asloudness, frequency, spectral content, fade-in, fade-out and toneduration, of the sound generators may be controlled digitally by acontroller included in the music synthesizer.

[0023] The controller may comprise one or more pseudo-random numbergenerators for generation of sequences of pseudo-random numbers. One ormore parameters of a sound generator may be determined based on thevalue of a number generated by one of the one or more pseudo-randomnumber generators. Different number generators may generate differentsequences of pseudo-random numbers controlling different parameters of aselected sound generator.

[0024] In a pseudo-random number sequence, the next number can not bedetermined from the previous number or a short sequence of the previousnumbers if the initial conditions of the number sequence are not known.

[0025] The controller may further comprise a temporal generatorcomprising a pseudo-random generator for determination of time periodsbetween start of generation of successive tones.

[0026] At least one of the pseudo-random number generators may beadapted to generate a sequence of self-similar numbers, or a sequence offractal numbers, preferably a sequence of self-similar numbers.

[0027] According to a second aspect of the present invention a tinnitustreatment method is provided, comprising the steps of synthesizing musicwith a music synthesizer for automatic generation of an electronicsignal representing music, converting the signal into sound, anddirecting the sound towards an ear of a person suffering from tinnitus.

[0028] The method may further comprise the step of compensating foranother hearing deficiency of the person.

[0029] The method may further comprise the step of adjusting the soundloudness to a loudness level that do not to mask the tinnituscompletely.

[0030] The method may also incorporate the steps of a method ofsynthesizing music provided according to a third aspect of the presentinvention, the method comprising the steps of generating a random numberwith a pseudo-random number generator, and calculating parameters of atone from the generated random number.

[0031] A sound generator may be used to generate the tone with thecalculated parameters. Various parameters, such as amplitude, frequency,spectral content, fade-in, fade-out and tone duration, etc, of agenerated tone may be determined based on the generated number.Different parameters may be determined from numbers occurring indifferent sequences of pseudo-random number sequences. Further, a periodbetween the start of succeeding tones may be determined from a number ina sequence of pseudo-random numbers, preferably a different sequence ofpseudo-random numbers. The pseudo-random number sequence may be asequence of self-similar numbers, or a sequence of fractal numbers,preferably a sequence of self-similar numbers.

[0032] It is an important advantage of the present invention thatsynthesizing music with pseudo-random number generators eliminates aneed for a large memory capable of storing a selection of recorded musicsufficiently large for the user not to be upset with repeated listeningto the same music. For example, carrying a separate device with largercapacity and thus a broader selection of music, would in general beconsidered cumbersome and incompatible with the daily use.

[0033] It has further been shown that music synthesized utilizing apseudo-random number generator generating self-similar numbers, orfractal numbers, etc, is surprisingly relaxing and comfortable to listento. Further, a music sequence generated by such a number generator isextremely long so that a person listening to the music does not perceivelistening to repeated music sequences. Further it has been noted that,typically, a person with tinnitus listening to the music does notexperience a complete masking of the tinnitus but rather a comfortabledistraction from the tinnitus whereby the person becomes capable ofconcentrating on other desired matters.

[0034] Thus, by synthesizing music according to the present invention,it is achieved that the synthesized music is perceived to be virtuallynon-repetitive, i.e. a listener does not recognize a repeated sequence.Further, although the synthesized music substantially covers the audiblespectrum, it does not mask signals of interest.

[0035] It is a further advantage that the electronic device according tothe present invention may be comprised in a hearing aid or in a hearingaid type of housing to be worn behind the ear, in the ear, or in the earcanal, without a need for a remote unit for storage and transmission ofmusic to the hearing aid or the hearing aid type of housing.

[0036] According to a fourth aspect of the present invention a binauralelectronic device is provided, comprising a first electronic device ofthe above-mentioned type to be positioned in one ear of a user, and asecond electronic device of the above-mentioned type to be positioned inthe other ear of the user.

[0037] According to a fifth aspect of the present invention a method ofthe above-mentioned type is provided, wherein music is synthesized anddirected towards one ear of a user, and different music is synthesizedand directed towards the other ear of the user.

[0038] It is an important advantage of the binaural electronic devicethat the device is capable of synthesizing different music in differentears of a user. A user with tinnitus has experienced that listening to abinaural device according to the present invention masks the tinnituscompletely even when the music is generated at a very low level ofloudness. This desirable effect is believed to be caused by cognitivecompetition in the brain caused by listening to different music indifferent ears. The first and second electronic devices may produce thesame music sequence displaced in time in relation to each other by aninterval of at least two tones. In the present context, a person is saidto listen to different music in each ear when each ear regularly doesnot listen to the same tones. For example, the same music sequence maybe played in each ear with a specific displacement in time between thetwo ears. The time displacement may be adjustable by the user so thatthe user may perform an optimum selection of a time displacement valuethat provides optimum cognitive competition in the brain, i.e. reducingthe perceived tinnitus effect to a minimum with a minimum of induceddisturbance of the user. Alternatively, the time displacement isdetermined by a random difference in start-up times of each of the musicsynthesizers.

[0039] It is preferred that a sequence of random numbers is provided byat least one of the following methods:

[0040] selection from tabulated random numbers,

[0041] synthesized by a pseudo random number generator,

[0042] synthesized by a self-similar number generator, or

[0043] synthesized by means of natural random events, such as 1/f-noisewhich is well-known to have a fractal character.

[0044] Circuitry operating according to one of these methods are easilyincorporated in a hearing aid, and thus a remote unit for generation andtransmission of music to the hearing aid is not required.

[0045] Sometimes, a remote, portable device may be preferred, e.g. bypersons suffering from tinnitus who do not have another hearingdeficiency. Such a device can be of a very small size, such as the sizeof a completely-in-the-canal hearing aid, and may include means forwireless communication. The remote device is carried by the user andtransmits music to either one or both ears, e.g. to a wireless earphoneor a wireless, preferably open, earplug. A remote device may also beutilized with a binaural system for transmission of identical ordifferent music to each ear.

[0046] In a preferred embodiment of the invention the digital signalprocessing means is further adapted to provide compensation for hearingimpairment. This allows the hearing aid to be used by persons sufferingfrom tinnitus and from hearing impairment.

[0047] In such an embodiment of the present invention, the synthesizedmusic is preferably introduced in the signal path before hearingimpairment compensation so that the full frequency range of thesynthesized music may be heard by the user of the hearing aid.

BRIEF DESCRIPTION OF THE DRAWING

[0048] Still other objects of the present invention will become apparentto those skilled in the art from the following description wherein theinvention will be explained in greater detail. By way of example, thereis shown and described a preferred embodiment of this invention. As willbe realized, the invention is capable of other different embodiments,and its several details are capable of modification in various, obviousaspects all without departing from the invention. Accordingly, thedrawings and descriptions will be regarded as illustrative in nature andnot as restrictive. In the drawing:

[0049]FIG. 1 is a schematic diagram of a portable electronic deviceaccording to the present invention,

[0050]FIG. 2 is a schematic diagram of a second embodiment of theinvention,

[0051]FIG. 3 is a schematic diagram of a set of sound generators,

[0052]FIG. 4 is a flow chart of an algorithm for synthesizing music,

[0053]FIG. 5 is a flow chart of an algorithm for controlling a soundgenerator,

[0054]FIG. 6 is a schematic diagram of a sound generator, and

[0055]FIG. 7 shows a very simple sequence of sounds from the musicsynthesizer and illustrates the generator parameters.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0056]FIG. 1 shows a schematic diagram of a hearing aid with anelectronic device according to the invention. The hearing aid comprisesa microphone 1 for reception of sound from the environment andgeneration of a corresponding electronic signal. The input transducermay be of a directional type, e.g. the input transducer may comprisemore than one microphone, wherein several input signals are combinedinto a single signal. The electronic signal is fed to a digital signalprocessor 2 via an A/D converter 7. If appropriate, the A/ID convertermay be preceded by a preamplifier (not shown). If the user suffers froma hearing impairment in addition to tinnitus, the digital signalprocessor 2 processes the signal for correction of the hearingimpairment and preferably, the synthesized music is introduced in thesignal path before hearing impairment compensation so that the fullfrequency range of the synthesized music may be heard by the user of thehearing aid.

[0057] The hearing aid further comprises a music synthesizer 10, and thedigital signal processor 2 comprises a hearing aid processor 5 and acontrol unit 6 for controlling the music synthesizer 10. In the presentembodiment, the music synthesizer 10 is integrated in the digital signalprocessor 2.

[0058] As shown in FIGS. 1 and 2, the output signal of the musicsynthesizer 10 may enter the main signal path of the hearing aid at apoint either before or after the digital signal processor 2, at therespective summing nodes 11 or 12 via a connection 13.

[0059] As shown in more detail in FIG. 3, the electronic devicecomprises a set of sound generators 16 a-16 e for generation ofsynthesized music. A sound generator is shown in further detail in FIG.6. Each of the sound generators comprises a damped oscillator 161 thatis excited or activated by an impulse. Various parameters of the soundgenerator 16 that determine the waveform of the signal generated by thesound generator 16 are adjusted by the controller 6. The parametersdetermine frequency, maximum amplitude, duration, rise-time, fall-time,and spectral content of the generated signal. These parameters areindicated in the plot of a generated signal shown in FIG. 7. In thisway, the sound generator 16 may simulate a known instrument, such as apiano, a flute, etc. Thus, upon activation, a sound generator generatesa signal representing a specific tone with a specific loudness, sonorousfigure and duration.

[0060] As shown in FIG. 3, the controller 6 comprises a sound generatorcontrol unit 14 and a selector unit 15 for selection of an idle soundgenerator from the set of sound generators 16 a-16 e. Preferably, thecontrol unit 14 comprises means for adjustment of music loudness forexample by setting an average amplitude of the output of each respectivesignal generator. This adjustment can be either automatic or usercontrolled or a combination thereof, e.g. the user can select a balancebetween loudness of music and environmental sounds, the actual musicloudness being controlled automatically in accordance with the currentmode of operation of the hearing aid. Alternatively, the sound level isadjusted, during a fitting procedure, to have a level compliant with thehearing threshold level (HTL) and the tinnitus level.

[0061] The outputs of the sound generators 16 a-16 e are added to acombined signal by adders 17 a-17 e and output on output line 13 forinjection into the signal path of the hearing aid at an appropriatepoint 11, 12 by injection means, such as adders, mixers, or other signalcombining units.

[0062] The controller 6, 14 controls the process of synthesizing musicby controlling time of activation and the parameters of each of thesound generators. Parameters, such as harmonic content, relating to thesonorous figure of a tone remain constant from tone to tone. The valuesof the parameters relating to the specific tone to be generated, such asfrequency, duration, amplitude, etc, for each of the sound generatorsare determined by mapping random numbers to values of these parameters.Thus, the controller 6 further comprises a set of pseudo-random numbergenerators for generation of random numbers. For each sound generator tobe activated, a specific pseudo-random number generator generates anumber for determination of a respective specific parameter. A pluralityof sound generators may be grouped together for synthesizing tones withthe same sonorous figure thereby simulating an instrument that iscapable of playing chords, such as a piano, a guitar, etc. A chord to besynthesized may be determined by mapping of the output of a specificpseudo-random number generator.

[0063] In the present embodiment of the invention, music is synthesizedthat will be perceived to be generated by three instruments. However,further variability of the synthesized music may be provided by varyingthe number of instruments, i.e. the number of sound generators, that iscurrently active synthesizing music. Thus, activation of a specificsound generator or a specific group of sound generators may bedetermined by mapping of the output of a specific pseudo-random numbergenerator.

[0064] Optionally, various categories of music, such as classical music,jazz music, etc, are user selectable. For each selectable music categorya set of instruments to be used for synthesizing music is predetermined.The set of instruments is defined by number of active sound generatorsand respective sets of parameters defining instrument types. Further, analgorithm for mapping of pseudo-random number values to respectiveparameter values is determined by the controller 6, 14. Thesepredetermined selections may for example be based on a statisticalanalysis of the selectable categories of music. For example, a set ofparameters for synthesizing Baroque music includes parameters of aharpsichord while parameters of an electric guitar are not included insuch a set of parameters. Also, the number of occurrences of changes intime intervals between tone starts is reduced by using e.g. every fourthrandom number to control the rhythm. Likewise, a set of parameters forsynthesizing so called electronic music, e.g. New Age music, includesparameters of electronic instruments, such as synthesizers, electricguitars, etc, and the synthesized music sequence has to have a largenumber of occurrences of extended tones. This last feature could beobtained by a re-mapping of the mapping that control tone duration.

[0065] In this way it is possible to synthesize music having an improvedresemblance to the users preferred music category.

[0066] Accordingly the number of sound generators must exceed the numberof instruments to be played. The illustrated embodiment has five soundgenerators and three instruments. However, this is an illustrativeexample only, and the actual number of sound generators may be greater,e.g. ten.

[0067] In the present embodiment the number of instrument voices aredetermined initially. Further variability may be added to thesynthesized music by varying the number of active instruments, i.e.sound generators and groups of sound generators, wherein the number ofactive instruments is controlled by yet another pseudo-random numbergenerator. For example, the instruments may be divided into aninstrument group that remains active during synthesizing, and a sologroup, the activation of which is controlled by the yet another randomnumber generator. Alternatively, the random number could be mapped todifferent sub-sets of the instruments of the set of instruments that isavailable in the music program in question.

[0068] The algorithm for generation of synthesized music is shown inmore detail in FIG. 4. In FIG. 4, the processing performed by thecontroller 6, 14 shown in FIG. 3 for controlling the sound generators isillustrated.

[0069] At block 40, the user may select a desired music category byselecting a corresponding music program 1-4. Four different programs 41a . . . 41 d are shown as an example, however any desired number ofmusic categories may be made available to the user. Upon selection ofthe desired music program 41 a . . . 41 d, the corresponding number andtypes of instruments are determined by the controller 6, 14.

[0070] Furthermore, parameters such as tempo, use of solo instrument,and use of extended tones are determined.

[0071] Having determined the parameters based on the selection of musiccategory, i.e. music program, music synthesizing starts. Optionally, asolo instrument may be utilized at block 43 as previously described.Activation of the solo instrument is controlled at block 45 by asequence of random numbers generated at block 46. The range of randomnumbers is mapped to two states of activation, either on or off so thatthe solo instrument is switched on or off randomly. In order to obtain alow switching rate, the rate of generation of the corresponding randomnumbers is kept low, e.g. corresponding to 10 bars of the synthesizedmusic. Likewise, the duty cycle of the solo instrument is determined byproper selection of the mapping of random numbers to the activationstate. At block 47 a, 47 b, etc, tone generation starts as described infurther detail below with reference to FIG. 5.

[0072] Although a solo instrument may increase the variability of thesynthesized music it may not be desired to activate the solo instrument,since it may increase the users attention to the music therebypreventing attention to other desired matters.

[0073] As indicated at block 44, music is synthesized by an instrumentgroup that remains constant during music synthesizing. Thus, noswitching feature is available for this group of instruments. Tonegeneration by a sound generator is further illustrated in the flow chartshown in FIG. 5. At block 50, a sequence of random numbers 54 are usedto control tone start time. For this purpose, the random numbers 54 aremapped to a selection of tone intervals, e.g. ¼, ⅛, ⅜ and {fraction(1/16)} notes. Further, it has been shown that it is desirable tocontrol the sum of tone durations within each bar of the synthesizedmusic to match the number of beats in a bar. As with the control of theswitching of the solo instrument, it is possible to adjust theprobability of tone variations by either adjusting the frequency ofgeneration (or the read-out) of the random numbers and/or by re-mappingthe tone mapping.

[0074] In addition, the amplitude, tone duration and frequency of thegenerated tones are controlled at blocks 52, 53 and 51, respectively, bysequences of respective random numbers 55, 56 and 57. For this purposethe random numbers are mapped to a scaling value, such that theparameter, e.g. frequency, is mapped to a range around a selected value,the selected value being a characteristic of the instrument (e.g. flutehaving a higher characteristic value than a cello). For exampleinstrument frequency may denote the frequency of the lowest tone thatcan be played by that instrument. Again, it is possible to adjust theprobability of variations by either adjusting the frequency ofgeneration (or the read-out) of the random numbers and/or by re-mappingthe tone mapping.

[0075] In the block 52 the amplitude of the tone is set by mapping therandom number generated in block 56 to a relative amplitude factor or,simply using the random number as the relative amplitude factor. Thisfactor is multiplied with the average amplitude previously set by thecontroller 6, 14 in order to determine the amplitude of the tone.

[0076] In the block 51 the tone frequency is set by mapping the randomnumber generated in block 55 to a frequency factor. This factor ismultiplied with the instrument frequency previously set by thecontroller 6, 14 in order to generate the frequency of the tone. Themapping results in generation of tones of the desired tone scale. Forinstruments synthesizing chords, the mapping algorithm, which isconfigured in block 42, may involve selection from a table offrequencies corresponding to tones of given chords.

[0077] At block 58, the controller 15 selects an idle sound generator,transfers the parameters, and activates the generator by transmission ofan impulse to the generator (the sequence {1, 0, 0, . . . } as shown inFIG. 6).

[0078] It should be noted that some parameters may be determined fromthe output of one common pseudo-random number generator whereby thedevice is simplified, probably at the expense of variability of thesynthesized music.

[0079] A sequence of self-similar numbers may be generated by thefollowing algorithms:

[0080] 1) Select a binary integer N1 with a predetermined number n ofbits.

[0081] 2) Add a second binary integer N2 to N1, N2 being either 2x−1 or2x+1, where x<n.

[0082] 3) Count the number of bits having the value ‘1’ in the result.This number is the final result.

[0083] 4) Repeat from step 2) to generate next number, iteratively usingthe sum of N1 and N2 as a new N1.

[0084] Other random numbers may be used to dither parameters ofgenerated sounds, e.g. dithering frequency, duration of the tone anddecay time, in order to further increase the variability of thesynthesized music.

[0085] It is preferred to generate a self-similar number sequence.Self-similar numbers may be generated in various ways. A preferred wayis to sum the bits of binary numbers in a binary counting sequence, i.e.0, 1, 10, 11, 100, 101, 110, 111, 1000 etc. whereby the sequence 0, 1,1, 2, 1, 2, 2, 3, 1 etc, is generated. It is noticed that a sequenceformed by every second value of this sequence is identical to theoriginal sequence. Likewise, a sequence that is formed by every fourthvalue or every 2^(n)th value is identical to the original sequence. Thisis a characterizing feature of self-similar number sequences and thisfeature is closely related to the scaling invariance of fractal numbersequences. It is to be noted that self-similar numbers are a sub-classof fractal numbers since linear fractals are exactly similar ondifferent scales (i.e. self-similar numbers) while non-linear fractalsare statistically similar on different scales (cf. Larry Solomon “Thefractal nature on music” on the internet at URLhttp://www.community.pima.edu/users/larry/fracmus.htm).

[0086] Associating these bit sums with tones according to apredetermined scheme will produce a synthesized music sequence. It isnot a requirement that all the values or values at fixed intervals areselected for the use for musical notes. This is due to the scaleinvariance of fractal sequences which is well-known in the art ofgeneration of synthesized music, e.g. from the internet articleKindermann, L., “MusiNum—The Music in the Numbers”, available from theInternet at URL http://www.forwiss.uni-erlangen.de/≠kinderma/, as ofOct. 25, 2000.

[0087] The synthesized music which may be produced e.g. by the abovemethod, is far from simple melodic sequences such as doorbells or thelike, and actually does give an impression not unlike that of actualmusic composed by a person.

[0088] In FIG. 6 there is depicted an embodiment of a sound generator16. The sound generator 16 incorporates a second order IIR filter forproducing an exponentially decaying sine-wave when excited with a singleinput impulse, as it is shown at point 1611 in the Figure. The IIRfilter 161 is followed by a multiplier 162 with a linear decayingfactor. The multiplier 162 causes the signal amplitude of the generatedsignal to reach zero within a finite time period. A signal indicatingtermination of tone generation is provided as indicated with feedbackpaths in FIG. 3 thereby indicating that the sound generator 16 isavailable for generating a new sound.

[0089] Further the sound generator 16 comprises a distortion circuit 163for adding harmonics to the generated signal. Preferably, the distortionfunction is a fifth order polynomial where k₄ and k₅ are the third andfifth order coefficients, respectively, of the polynomial.Alternatively, there is a number of techniques available to the skilledperson for production of harmonic distortion, e.g. clipping of thegenerated signal in combination with an adjustable equalizer.Advantageously, this distortion circuit is able to generate differentharmonics characteristic of different instruments (voices) so that eachsound generator may generate a signal representing the sound of anydesired instrument to be utilized in the music synthesizer.

[0090] The sound generator 16 operates at a fixed sampling frequencyf_(samp). It uses four input parameters for generating specific sounds,the desired frequency f, the fade-out time T_(fadeout), and the twodistortion coefficients k₄ and k₅.

[0091] From these input parameters and the sampling frequency thefactors k₁, k₂ and k₃ are computed from the following equations.$\begin{matrix}{k_{1} = \frac{- 1}{T_{fadeout}f_{samp}}} \\{k_{2} = {{4 \cdot {\sin^{2}\left( {\pi \frac{f}{f_{samp}}} \right)}} \cong {4 \cdot \left( {\left( {\pi \frac{f}{f_{samp}}} \right) - {\frac{1}{6}\left( {\pi \frac{f}{f_{samp}}} \right)^{3}}} \right)^{2}}}} \\{k_{3} = \frac{2}{\tau \cdot f_{samp}}}\end{matrix}$

[0092] where τ is the time-constant in the exponential decay.

[0093] The oscillator block 161 has a second-order z-transform of theform${H(z)} = \frac{z^{2}}{\left( {1 - k_{3}} \right) + {z\left( {k_{2} + k_{3} - 2} \right)} + z^{2}}$

[0094] so that fade-in and fade-out time constants are determined by thek₃ coefficient.

[0095] Likewise, an exponential fade-in of the sound generator may beprovided by a modified oscillator wherein the amplitude is modified by afade-in gain factor of e.g. (1−exp(−t/t_(r))).

[0096] In FIG. 7 these parameters for generation of voice and tempo isillustrated. FIG. 7 is a plot of the signal energy of a part of a musicsignal. It is illustrated that a tone (sine-wave with harmonicdistortion, fundamental frequency f and amplitude A) is generated withfade-in and fade-out time-constants t_(r) and t_(d) determined by the k₃coefficient. Furthermore, it is shown (exaggerated since the truncationtakes the form of an exponential decay multiplied with a linear decay)that the envelope and thus the duration of the tone is truncated (theslope D) by the multiplier 162 which is controlled by the k₁coefficient. Further, it is shown that the time T_(N) between tonestarts can be shorter than the duration of the tone T_(t) and that tonestart times may be varied T_(N1), T_(N2) . . . The linear decay iscontrolled by the block 162, in the form of a multiplication with afactor which is initialized to 1 and subsequently reduced by an amountk₁ for every sample.

[0097] The tones of the various instruments may be played by any one ofthe set of sound generators 16 a-16 e. Thus, it is not necessary toprovide different types of sound generators for different instruments.

1. An ear level electronic device comprising a housing that is adaptedto be worn behind the ear, in the ear, or in the ear canal, and toenclose a music synthesizer for generation of a first electrical signalrepresenting music and an output transducer for conversion of the firstelectrical signal into sound.
 2. An electronic device according to claim1, comprised in a digital hearing aid having the housing, an inputtransducer (1) for transforming an acoustic input signal into a secondelectrical signal, a digital signal processing means (2) forcompensating a hearing deficiency by generation of a third electricalsignal based on the second electrical signal, and wherein the outputtransducer (3) converts a combination of the first and third signalsinto sound.
 3. An electronic device according to claim 1, comprised in adigital hearing aid having the housing, an input transducer (1) fortransforming an acoustic input signal into a second electrical signal, adigital signal processing means (2) for compensating a hearingdeficiency by generation of a third electrical signal based on acombination of the first and the second electrical signals, and whereinthe output transducer (3) converts the third electrical signal intosound.
 4. An electronic device according to claim 1, for use intreatment of tinnitus.
 5. An electronic device according to claim 4,wherein the music synthesizer is adapted to present the synthesizedmusic at the output transducer (3) with a loudness level that does notmask the tinnitus completely.
 6. An electronic device according to claim1, wherein the music synthesizer comprises a set of sound generators (16a-16 e).
 7. An electronic device according to claim 6, wherein the musicsynthesizer comprises a controller (6) for controlling the set of soundgenerators (16 a-16 e) and comprising a first pseudo-random numbergenerator, and wherein control parameters of the set of sound generators(16 a-16 e) are calculated from numbers generated by the firstpseudo-random number generator.
 8. An electronic device according toclaim 7, wherein the control parameters of the set of sound generators(16 a-16 e) comprises a tone frequency control parameter.
 9. Anelectronic device according to claim 8, wherein the control parametersof the set of sound generators (16 a-16 e) comprises a tone fade-inparameter.
 10. An electronic device according to any of claims 8,wherein the control parameters of the set of sound generators (16 a-16e) comprises a tone fade-out parameter.
 11. An electronic deviceaccording to any of claims 8, wherein the control parameters of the setof sound generators (16 a-16 e) comprises at least one harmonic controlparameter.
 12. An electronic device according to any of claims 8,wherein the control parameters of the set of sound generators (16 a-16e) comprises a tone amplitude parameter.
 13. An electronic deviceaccording to any of claims 8, further comprising a second pseudo-randomgenerator, and wherein a second subset of control parameters of thecontrol parameters of the set of sound generators (16 a-16 e) arecalculated from numbers generated by the second pseudo-random numbergenerator while a different first subset of control parameters of thecontrol parameters of the set of sound generators (16 a-16 e) arecalculated from numbers generated by the first pseudo-random numbergenerator.
 14. An electronic device according to any of claims 8,further comprising a temporal generator comprising a third pseudo-randomgenerator, and wherein time periods between start of tone generation aredetermined by numbers generated by the third random generator.
 15. Anelectronic device according to any of claims 8, wherein one of the setof sound generators is controlled by an independent set of threepseudo-random generators.
 16. An electronic device according to any ofclaims 8, further comprising a fourth pseudo-random generator forcontrolling the number of active sound generators.
 17. An electronicdevice according to claim 16, wherein one pseudo-random number generatoris adapted to generate a sequence of self-similar numbers.
 18. Anelectronic device according to claim 16, wherein one pseudo-randomnumber generator is adapted to generate a sequence of fractal numbers.19. An electronic device according to any of claims 17, wherein thecontroller 6 further comprises a selector unit 15 for the selection ofan idle sound generator from the set of sound generators 16 a-16 e forgeneration of a tone.
 20. An electronic device according to claim 19,wherein at least one of the set of sound generators (16 a-16 e)comprises a second order IIR filter for generation of an exponentiallydecaying sine shaped signal upon reception of an input impulse.
 21. Anelectronic device according to claim 20, wherein the at least one soundgenerator further comprises a multiplier (162) with a linear decayingfactor causing the generated signal amplitude to reach zero within afinite time period.
 22. An electronic device according to claim 21,wherein the at least one sound generator further comprises a distortioncircuit (163) for adding harmonics to the generated sine shaped signal.23. A binaural hearing aid system comprising a first electronic deviceaccording to any of the preceding claims to be positioned in one ear ofa user, and a second electronic device according to any of the precedingclaims to be positioned in the other ear of the user.
 24. A binauralhearing aid system according to claim 23, wherein the first electronicdevice synthesizes music that is different from music synthesized by thesecond electronic device.
 25. A method of synthesizing music comprisingthe steps of generating a random number with a pseudo-random numbergenerator, and calculating parameters of a tone from the generatedrandom number.
 26. A method of synthesizing music according to claim 25,further comprising the step of generating the tone with the calculatedparameters with a sound generator.
 27. A method of synthesizing musicaccording to claim 26, wherein tone frequency is one of the calculatedparameters.
 28. A method of synthesizing music according to claim 27,wherein tone fade-in is one of the calculated parameters.
 29. A methodof synthesizing music according to any of claims 27, wherein tonefade-out is one of the calculated parameters.
 30. A method ofsynthesizing music according to any of claims 27, wherein harmonicfrequency content is one of the calculated parameters.
 31. A method ofsynthesizing music according to any of claims 27, wherein tone amplitudeis one of the calculated parameters.
 32. A tinnitus treatment methodcomprising the steps of synthesizing music with a music synthesizer forautomatic generation of electronic signals representing music,converting the signals into sound, and directing the sound towards anear of a person suffering from tinnitus.
 33. A method according to claim32, further comprising the step of compensating for another hearingdeficiency of the person.
 34. A method according to claim 32, furthercomprising the step of adjusting the sound loudness to a loudness levelthat do not to mask the tinnitus completely.
 35. A method according toany of claims 32, further comprising the step of sequentially generatinga first pseudo-random number, and wherein the electronic signals arederived from the generated pseudo-random number.
 36. A method accordingto any of claims 35, further comprising the step of generating a tonebased on the generated pseudo-random number.
 37. A method according toany of claims 36, further comprising the step of generating the signalwith a fade-in time constant based on the generated pseudo-randomnumber.
 38. A method according to any of claims 36, further comprisingthe step of generating the signal with a fade-out time constant based onthe generated pseudo-random number.
 39. A method according to any ofclaims 36, further comprising the step of generating the signal with aharmonic distortion based on the generated pseudo-random number.
 40. Amethod according to any of claims 36, further comprising the step ofgenerating the signal with an amplitude based on the generatedpseudo-random number.
 41. A method according to any of claims 36,further comprising the steps of sequentially generating a secondpseudo-random number, and synthesizing the signal with a parameter basedon the first pseudo-random number and another parameter based on thesecond pseudo-random number.
 42. A method according to any of claims 36,further comprising the steps of sequentially generating a thirdpseudo-random number, and synthesizing the signal with a time periodbetween start of tone generation determined by numbers generated by thethird random generator.
 43. A method according to any of claims 36,wherein one pseudo-random number generator is adapted to generate asequence of self-similar numbers.
 44. A method according to any ofclaims 36, wherein one pseudo-random number generator is adapted togenerate a sequence of fractal numbers.
 45. A method according to any ofclaims 36, wherein music is synthesized and directed towards one ear ofa user, and different music is synthesized and directed towards theother ear of the user.